<?php

namespace App\Http\Requests\Blog;

use App\Http\Requests\Request;

class BlogRequest extends Request
{
    public function rules()
    {
        return [
            'title' => 'required',
            'description' => 'required',
            'type_id' => 'required',
            'sub_description' => 'required'
        ];
    }

    public function messages()
    {
        return [
            'title.required' => '文章标题未填写',
            'description.required' => '文章详情未填写',
            'type_id.required' => '文章分类未填写',
            'sub_description.required' => '文章简单详情未填写'
        ];
    }
}
